package zhongbo.java.fast.order.exception;

import lombok.Data;

/**
 * 说明：
 *
 * @author 钟波dellNotebook
 * @since 2025年03月27日 星期四 02:39:21
 */
public class BusinessException extends RuntimeException {

    private ExceptionCode code = ExceptionCode.ERROR;

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(String message, ExceptionCode code) {
        super(message);
        this.code = code;
    }

    public BusinessException(ExceptionCode code) {
        super(code.msg);
        this.code = code;
    }

    public ExceptionCode getCode() {
        return code;
    }
}
